feat(db): expose connection startup timeline - #7286
Draft
ravarora2 wants to merge 1 commit into
Draft
Conversation
🔐 Codex Security Review
|
Record operation checkout starts and bounded writer connection setup steps in metrics and lifecycle logs. Co-authored-by: Ravneet Arora <rarora@squareup.com> Signed-off-by: Ravneet Arora <rarora@squareup.com>
ravarora2
force-pushed
the
rarora/db-connection-timeline
branch
from
September 3, 2026 19:27
f58e948 to
2c3e30d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Pool outcomes and coarse pool-state metrics show pressure after the fact, but they do not show when a checkout began or which writer-connection safety premise failed. Operators need bounded evidence that distinguishes pool saturation from slow or failing connection construction during boot and later pool growth.
What
Risk Assessment
Medium — this changes the production writer-pool
after_connecthook and adds one counter increment to instrumented checkout paths. The database safety operations and failure semantics are unchanged; telemetry uses fixed enums, excludes URLs/raw errors, and has an explicit per-pod series ceiling. The principal residual risk is observability overhead when SQLx creates replacement connections, bounded to synchronous fixed-schema records and fixed-cardinality metrics.References
mainremoved that duplicate commit from this PR.f58e9480a4f068db0c591f604fd6800fdd4bfc45. All runtime and deployment files in this PR are byte-identical at the rebased head; the only tree difference between those heads is an unrelated NIP-FI document newly present onmain.sha256:b9351fa644e08376cbe1999f9bee311d33d1799a68eadef7929c4f862a832fecfrom https://github.com/block/buzz/actions/runs/33780888255.buzz-6c8758bd7dbecame Ready with zero restarts, every observed initial writer connection reacheddb_ready, and the new metrics produced data.Generated with Codex